home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / AppsToGo / DTS.Lib / DTS.Lib.headers / PICTControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  3.9 KB  |  103 lines  |  [TEXT/MPS ]

  1. #ifndef __PICTCONTROL__
  2. #define __PICTCONTROL__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __CONTROLS__
  9. #include <Controls.h>
  10. #endif
  11.  
  12. #ifndef __WINDOWS__
  13. #include <Windows.h>
  14. #endif
  15.  
  16.  
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22.  
  23.  
  24. ControlHandle    CPICTNew(WindowPtr window, Rect *r, StringPtr title, Boolean vis, short val,
  25.                          short min, short max, short viewID, short refcon);
  26.     /*
  27.     **    ¶ Create a new 'PICT' control.
  28.     **
  29.     **    INPUT:    window            The window to add the control to
  30.     **            r                The bounding rect of the control being added
  31.     **            title            The title of the control being added (don't pass in nil here)
  32.     **            vis                True if control should be created initially visible
  33.     **            val                Initial value for the contrlValue field of the control
  34.     **            val                Initial value for the contrlMin field of the control
  35.     **            val                Initial value for the contrlMax field of the control
  36.     **            viewID            Normally rPICTCtl, as that is the standard AppsToGo
  37.     **                            resource ID for this control, but you may wish to have
  38.     **                            the CDEF have a different resource id #.
  39.     **            refcon            Initial value for the contrlRfCon field of the control
  40.     **    RESULT:    ControlHandle    The control handle of the created control, or nil if
  41.     **                            the control could not be created.
  42.     **
  43.     **    Create a new PICT control.  All the parameters are what you would expect for creating
  44.     **    a new control.
  45.     **            Variants:
  46.     **                +1:    Sticky buttons.  (Can't be tracked off of once clicked on.)
  47.     **                +2:    Draw offscreen.  This is important if the control has a title and
  48.     **                    you don't want flashing.
  49.     **                +4:    Size control to PICT.  This saves you the trouble of setting the
  50.     **                    bounding box of the control to the size of the PICT.  Note that
  51.     **                    the control is simply created based on the bounding rect of the PICT,
  52.     **                    instead of the control.
  53.     **                +8:    Draw the control title in srcOr mode after drawing the PICT.  This allows
  54.     **                    you to easily add text to a PICT control, not to mention change the
  55.     **                    text while the application is running. */
  56.  
  57. ControlHandle    CPICTNext(WindowPtr window, ControlHandle ctl, short dir, Boolean justActive);
  58.     /*
  59.     **    ¶ Iterate to the 'next' PICT control.
  60.     **
  61.     **    INPUT:    window            The window who's control list is to be searched
  62.     **            ctl                The control at which to start the search
  63.     **                            (Pass in nil to start at the beginning of the control list.)
  64.     **            dir                The direction of the search (1 or -1).  Note that the meaning
  65.     **                            of the beginning of the control list changes if -1 is passed in.
  66.     **                            The beginning of the control list to search is actually the
  67.     **                            last control in the window's control list if -1 is used.
  68.     **            justActive        If true, only find CPICT controls that are active.
  69.     **                            (Active is defined as contrlHilite != 255).
  70.     **    OUTPUT:    ControlHandle    Handle of PICT found.  If nil is returned, no more to
  71.     **                            be found meeting criteria.
  72.     **
  73.     **    Return the next PICT control from a window's control list. 
  74.     **
  75.     **    To get the first control in the window's control list, pass in a nil for ctl.
  76.     **    Pass in either 1 or -1 for the direction of the search.  Passing in a 1 means to
  77.     **    return the control just after the one passed in (or the first one if nil is passed in).
  78.     **    Passing in a -1 means to return the control just prior to the one passed in (or the
  79.     **    last control if nil is passed in).  If there are no more controls, then nil is returned.
  80.     **    The justActive field indicates if you want to return only visible, active controls.
  81.     **    If false is passed in, then the next control is returned, independent of state.
  82.     **    If true is passed in, then the next visible, active control is returned. */
  83.  
  84. Boolean            IsPICTCtl(ControlHandle ctl);
  85.     /*
  86.     **    ¶ Check if the control is a 'PICT' control.
  87.     **
  88.     **    INPUT:    ctl            Handle of control to test to see if it is a PICT control.
  89.     **    RESULT:    Boolean        True if control is a PICT control.
  90.     **
  91.     **    Check to see if the control is a PICT control. */
  92.  
  93.  
  94.  
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98.  
  99.  
  100.  
  101. #endif
  102.  
  103.